<?php
	//------------------------------------------------------------------------------
	// correspondances.php
	// Développeur : Troyeu
	// Version : 0.1
	// Dernière modification : 08/11/2010 - 01:27
	// Action : Permet d'afficher les correspondances des races
	//------------------------------------------------------------------------------

	$PAGE='LNM - Correspondances des Races';
	$VERSION='1.0';

	require_once("includes/fr/unites.php");

	$corps .= "<br>
		<h2>Liste des correspondances des Races</h2>";
	$corps .= '<form method="post" action="goodies.php?source='.$source.'">
   		<p>	
		Race : 
		<select name="nameRace" id="nameRace">';
		foreach($nomrace as $listNameRace)
		{
  		  $corps .= '<option value="'.$listNameRace.'">'.$listNameRace.'</option>';
		}	
       	$corps .= '</select> comparer avec :
		<select name="nameRaceToCompare" id="nameRaceToCompare">';
	foreach($nomrace as $listNameRace)
		{
  		  $corps .= '<option value="'.$listNameRace.'">'.$listNameRace.'</option>';
		}
	$corps .= '
		</select>
		<input type="hidden" name="correspondances" />
 		<input type="submit" value="S&eacute;lectionner" name="nameSubmit" />
		</p>
		</form>
		<br>';
	if(isset($_POST['nameSubmit']))
	{
	$nameRace = $_POST['nameRace'];
	$nameRaceToCompare = $_POST['nameRaceToCompare'];

	$corps .= '<table class="normal">';
	$corps .= '<tr>';
	$corps .= '<th colspan="3">'.$nameRace.'</th>';
	$corps .= '<th colspan="2">'.$nameRaceToCompare.'</th>';
	$corps .= '</tr>';
	$corps .= '<tr>';
	$corps .= '<th>Base</th>';
	$corps .= '<th>B&acirc;timent</th>';
	$corps .= '<th>Unit&eacute;</th>';
	$corps .= '<th>B&acirc;timent</th>';
	$corps .= '<th>Unit&eacute;</th>';
	$corps .= '</tr>';


	$corps .= '<tr>';
	$corps .= '<td>Ch&acirc;teau</td>';
	$corps .= '<td>'.$batiment[0]["$nameRace"].'</td>';
	$corps .= '<td>&nbsp;</td>';
	$corps .= '<td>'.$batiment[0]["$nameRaceToCompare"].'</td>';
	$corps .= '<td>&nbsp;</td>';
	$corps .= '</tr>';
	
	$corps .= '<tr>';
	$corps .= '<td>Militaire 1</td>';
	$corps .= '<td>'.$batiment[8]["$nameRace"].'</td>';
	$corps .= '<td>'.ucfirst($nomunite[8]["$nameRace"]).'</td>';
	$corps .= '<td>'.$batiment[8]["$nameRaceToCompare"].'</td>';
	$corps .= '<td>'.ucfirst($nomunite[8]["$nameRaceToCompare"]).'</td>';
	$corps .= '</tr>';

	$corps .= '<tr>';
	$corps .= '<td>Militaire 2</td>';
	$corps .= '<td>'.$batiment[11]["$nameRace"].'</td>';
	$corps .= '<td>'.ucfirst($nomunite[11]["$nameRace"]).'</td>';
	$corps .= '<td>'.$batiment[11]["$nameRaceToCompare"].'</td>';
	$corps .= '<td>'.ucfirst($nomunite[11]["$nameRaceToCompare"]).'</td>';
	$corps .= '</tr>';
	
	$corps .= '<tr>';
	$corps .= '<td>Militaire 3</td>';
	$corps .= '<td>'.$batiment[9]["$nameRace"].'</td>';
	$corps .= '<td>'.ucfirst($nomunite[9]["$nameRace"]).'</td>';
	$corps .= '<td>'.$batiment[9]["$nameRaceToCompare"].'</td>';
	$corps .= '<td>'.ucfirst($nomunite[9]["$nameRaceToCompare"]).'</td>';
	$corps .= '</tr>';

	$corps .= '<tr>';
	$corps .= '<td>Militaire 4</td>';
	$corps .= '<td>'.$batiment[14]["$nameRace"].'</td>';
	$corps .= '<td>'.ucfirst($nomunite[14]["$nameRace"]).'</td>';
	$corps .= '<td>'.$batiment[14]["$nameRaceToCompare"].'</td>';
	$corps .= '<td>'.ucfirst($nomunite[14]["$nameRaceToCompare"]).'</td>';
	$corps .= '</tr>';

	$corps .= '<tr>';
	$corps .= '<td>Militaire 5</td>';
	$corps .= '<td>'.$batiment[12]["$nameRace"].'</td>';
	$corps .= '<td>'.ucfirst($nomunite[12]["$nameRace"]).'</td>';
	$corps .= '<td>'.$batiment[12]["$nameRaceToCompare"].'</td>';
	$corps .= '<td>'.ucfirst($nomunite[12]["$nameRaceToCompare"]).'</td>';
	$corps .= '</tr>';

	$corps .= '<tr>';
	$corps .= '<td>Militaire 6</td>';
	$corps .= '<td>'.$batiment[15]["$nameRace"].'</td>';
	$corps .= '<td>'.ucfirst($nomunite[15]["$nameRace"]).'</td>';
	$corps .= '<td>'.$batiment[15]["$nameRaceToCompare"].'</td>';
	$corps .= '<td>'.ucfirst($nomunite[15]["$nameRaceToCompare"]).'</td>';
	$corps .= '</tr>';

	$corps .= '<tr>';
	$corps .= '<td>Militaire 7</td>';
	$corps .= '<td>'.$batiment[13]["$nameRace"].'</td>';
	$corps .= '<td>'.ucfirst($nomunite[13]["$nameRace"]).'</td>';
	$corps .= '<td>'.$batiment[13]["$nameRaceToCompare"].'</td>';
	$corps .= '<td>'.ucfirst($nomunite[13]["$nameRaceToCompare"]).'</td>';
	$corps .= '</tr>';
	
	$corps .= '<tr>';
	$corps .= '<td>Militaire 8</td>';
	$corps .= '<td>'.$batiment[16]["$nameRace"].'</td>';
	$corps .= '<td>'.ucfirst($nomunite[16]["$nameRace"]).'</td>';
	$corps .= '<td>'.$batiment[16]["$nameRaceToCompare"].'</td>';
	$corps .= '<td>'.ucfirst($nomunite[16]["$nameRaceToCompare"]).'</td>';
	$corps .= '</tr>';

	$corps .= '<tr>';
	$corps .= '<td>Espionnage</td>';
	$corps .= '<td>'.$batiment[17]["$nameRace"].'</td>';
	$corps .= '<td>'.ucfirst($nomunite[17]["$nameRace"]).'</td>';
	$corps .= '<td>'.$batiment[17]["$nameRaceToCompare"].'</td>';
	$corps .= '<td>'.ucfirst($nomunite[17]["$nameRaceToCompare"]).'</td>';
	$corps .= '</tr>';

	$corps .= '</table>';
	}
	
